﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2006"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
    xmlns:igCA="http://infragistics.com/Chart"
    >
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="ChartShared.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <!-- Grid Area Style -->
    <Style x:Key="GridAreaStyle"  TargetType="{x:Type igCA:GridArea}">
        <Setter Property="Background" Value="Transparent"/>
        <Style.Triggers>
            <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                <EventTrigger.Actions>
                    <BeginStoryboard>
                        <BeginStoryboard.Storyboard>
                            <Storyboard>
                                <ColorAnimation
                Duration="00:00:01"
                BeginTime="00:00:00.85"
                Storyboard.TargetProperty="Background.Color"
                From="Transparent"
                To="White"/>
                            </Storyboard>
                        </BeginStoryboard.Storyboard>
                    </BeginStoryboard>
                </EventTrigger.Actions>
            </EventTrigger>
        </Style.Triggers>
    </Style>
    <!-- Scene Style -->
    <Style TargetType="{x:Type igCA:Scene}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
    </Style>
    <!-- Axis Style -->
    <Style TargetType="{x:Type igCA:Axis}">
        <Setter Property="Stroke" Value="#FFBDB292"/>
    </Style>
    <!-- Axis Animation -->
    <igCA:Animation x:Key="AxisAnimation" BeginTime="00:00:00.5" Duration="00:00:00.5" />
    <!-- Gridlines -->
    <igCA:Mark x:Key="AnimationMarkX" Style="{StaticResource AxisMark}" >
        <igCA:Mark.Animation>
            <igCA:Animation BeginTime="00:00:00.0" Duration="00:00:00.25"/>
        </igCA:Mark.Animation>
    </igCA:Mark>
    <!-- Gridlines -->
    <igCA:Mark x:Key="AnimationMarkY" Style="{StaticResource AxisMark}" >
        <igCA:Mark.Animation>
            <igCA:Animation BeginTime="00:00:00.0" Duration="00:00:00.25"/>
        </igCA:Mark.Animation>
    </igCA:Mark>
    <!-- LabelsX -->
    <igCA:Label x:Key="AnimationLabelsX"  Style="{StaticResource AnimationLabelsStyle}" />
    <!-- LabelsY -->
    <igCA:Label x:Key="AnimationLabelsY"  Style="{StaticResource AnimationLabelsStyle}" />
    <!-- Animation Axis Mark -->
    <Style TargetType="{x:Type igCA:Mark}">
        <Setter Property="Stroke" Value="Transparent"/>
    </Style>
    <!--  Legend Items -->
    <DataTemplate DataType="{x:Type igCA:LegendItemTemplate}">
        <Grid Background="{x:Null}" Margin="0,0,0,0"  Width="Auto" Height="Auto">
            <Viewbox HorizontalAlignment="Left" MaxHeight="20" VerticalAlignment="Stretch" Stretch="Uniform">
                <StackPanel Orientation="Horizontal" Width="Auto" Height="Auto">
                    <Grid Width="Auto">
                        <Ellipse
    					Fill="{Binding Path=Fill}"
    					Width="11"
    					Height="11"
    					StrokeThickness="1"
      			/>
                    </Grid>
                    <TextBox Text="{Binding Path=Text}" VerticalAlignment="Bottom" HorizontalAlignment="Left"  Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FF4B4B4B"  Margin="3,0,0,0" BorderThickness="0,0,0,0"/>
                </StackPanel>
            </Viewbox>
        </Grid>
    </DataTemplate>
    <!-- Legend -->
    <Style x:Key="LegendBase" TargetType="{x:Type igCA:Legend}">
        <Setter Property="Foreground" Value="#FF4B4B4B"/>
        <Setter Property="Background" Value="#FFF4EEDD"/>
        <Setter Property="UseDataTemplate" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type igCA:Legend}">
                    <ControlTemplate.Resources>
                        <Storyboard x:Key="Timeline1">
                            <ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
                                <SplineColorKeyFrame KeyTime="00:00:00.5000000" Value="#FFFFFBEE"/>
                            </ColorAnimationUsingKeyFrames>
                        </Storyboard>
                    </ControlTemplate.Resources>
                    <Grid Background="{x:Null}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.08*"/>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="0.08*"/>
                        </Grid.ColumnDefinitions>
                        <Border Width="Auto" Height="Auto" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,1" CornerRadius="2,2,2,2" Background="{TemplateBinding Background}" Margin="0,0,0,0" Grid.ColumnSpan="3"/>
                        <Border Width="Auto" Height="Auto" BorderThickness="0,0,0,0" CornerRadius="0,0,2,2" Margin="1,13,1,2" BorderBrush="{x:Null}" Background="#FFFFFFFF" x:Name="border" Grid.ColumnSpan="3"/>
                        <ContentPresenter Margin="0,15,0,3" VerticalAlignment="Stretch" Grid.Column="1" Grid.ColumnSpan="1"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Trigger.EnterActions>
                                <BeginStoryboard Storyboard="{StaticResource Timeline1}" x:Name="Timeline1_BeginStoryboard"/>
                            </Trigger.EnterActions>
                            <Trigger.ExitActions>
                                <StopStoryboard BeginStoryboardName="Timeline1_BeginStoryboard"/>
                            </Trigger.ExitActions>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush" Value="#FFDADADA"/>
    </Style>
    <!-- Single Series Legend Style-->
    <Style x:Key="SingSeriesLegendStyle" TargetType="{x:Type igCA:Legend}" BasedOn="{StaticResource LegendBase}">
        <Setter Property="MarginType" Value="Percent"/>
        <Setter Property="Margin" Value="75,45,5,45"/>
    </Style>
    <!-- Multy Series Legend Style-->
    <Style TargetType="{x:Type igCA:Legend}" BasedOn="{StaticResource LegendBase}"/>

    <!--Stripe-->
    <igCA:Animation x:Key="StripeAnimation" Sequential="False" BeginTime="00:00:00.2" Duration="00:00:00.5"></igCA:Animation>
    <Style x:Key="StripeStyle" TargetType="{x:Type igCA:Stripe}">
        <Setter Property="Fill" Value="#FFF9F8F4"/>
        <Setter Property="Stroke" Value="Transparent"/>
        <Setter Property="Animation" Value="{StaticResource StripeAnimation}"/>
    </Style>
</ResourceDictionary>
